/**
 * @author lk
 * @date 2022/6/2 10:30
 */
package com.mmall.spring5.service;

import com.mmall.spring5.dao.BookDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class BookService {
    @Autowired
    BookDao bookDao;

    @Transactional
    public void add() {
        bookDao.add();
        int i = 1 / 0;
        bookDao.reduce();
    }
}
